package com.netflexitysolutions.amazonws.ec2;

import java.util.HashMap;
import java.util.Map;

public enum AttachmentStatus {

	ATTACHING("attaching"), ATTACHED("attached"), DETACHING("detaching"), DETACHED("detached");

	private static Map<String, AttachmentStatus> statusByName = new HashMap<String, AttachmentStatus>();
	
	static {
		AttachmentStatus[] statuses = AttachmentStatus.values();
		for (AttachmentStatus status : statuses) {
			statusByName.put(status.getName(), status);
		}
	}
	
	public static AttachmentStatus attachmentStatusForName(String name) {
		return statusByName.get(name);
	}
	
	private String name;
	
	private AttachmentStatus(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	

}
